package com.example.flashApp.usage

data class UsageStat(
    val appName: String,
    val packageName: String,
    val usageDuration: Long // in milliseconds
) {
    fun getFormattedDuration(): String {
        val seconds = usageDuration / 1000
        val hours = seconds / 3600
        val minutes = (seconds % 3600) / 60
        return when {
            hours > 0 -> "$hours hours $minutes minutes"
            minutes > 0 -> "$minutes minutes"
            else -> "$seconds seconds"
        }
    }
}
